[{"data":1,"prerenderedAt":543},["ShallowReactive",2],{"site-chrome-my":3,"site-chrome-en":-1,"site-chrome-th":-1,"glossary-term-my":287,"blog-categories-my":300,"article-glossary-my-\u002Fglossary\u002Fsafety-stock":320,"og-copy-my":479,"og-posts-my-none":521,"glossary-related-my-safety-stock":522},{"id":4,"extension":5,"footer":6,"header":116,"indexFacets":202,"meta":243,"notFound":244,"stem":250,"ui":251,"__hash__":286},"chrome_en\u002Fen\u002Fchrome.yml","yml",{"columns":7,"legal":83,"quote":84,"askAi":87,"socials":103},[8,29,47,65],{"label":9,"children":10},"Product",[11,14,17,20,23,26],{"label":12,"to":13},"Ads optimization","\u002Fmy\u002Fblog\u002Fads-optimization",{"label":15,"to":16},"Unit economics","\u002Fmy\u002Fblog\u002Fprofit-margin",{"label":18,"to":19},"Agentic KAM","https:\u002F\u002Flearn.dataglasslabs.com\u002Fdocs\u002Fai-and-api\u002Fassistants",{"label":21,"to":22},"One-click deploy","https:\u002F\u002Flearn.dataglasslabs.com\u002Fdocs\u002Fgrowth\u002Factions\u002Faction-flow",{"label":24,"to":25},"Integrations","https:\u002F\u002Flearn.dataglasslabs.com\u002Fdocs\u002Foverview\u002Fget-started\u002Fsupported-platforms",{"label":27,"to":28},"Pricing","\u002Fmy\u002Fpricing",{"label":30,"children":31},"Resources",[32,35,38,41,44],{"label":33,"to":34},"Blog","\u002Fmy\u002Fblog",{"label":36,"to":37},"Customer stories","\u002Fmy\u002Fcustomers",{"label":39,"to":40},"Research","\u002Fmy\u002Fresearch",{"label":42,"to":43},"Glossary","\u002Fmy\u002Fglossary",{"label":45,"to":46},"Docs","https:\u002F\u002Flearn.dataglasslabs.com\u002Fdocs",{"label":48,"children":49},"Company",[50,53,56,59,62],{"label":51,"to":52},"About","\u002Fmy\u002Fcompany",{"label":54,"to":55},"Contact","\u002Fmy\u002Fcontact",{"label":57,"to":58},"Book a demo","\u002Fmy\u002Fbook-a-demo",{"label":60,"to":61},"Privacy","\u002Fmy\u002Flegal\u002Fprivacy",{"label":63,"to":64},"Terms","\u002Fmy\u002Flegal\u002Fterms",{"label":66,"children":67},"DataGlass for",[68,71,74,77,80],{"label":69,"to":70},"Agencies","\u002Fmy\u002Ffor\u002Fagencies",{"label":72,"to":73},"Brands","\u002Fmy\u002Ffor\u002Fbrands",{"label":75,"to":76},"Planners and optimizers","\u002Fmy\u002Ffor\u002Fplanners",{"label":78,"to":79},"Managers and analysts","\u002Fmy\u002Ffor\u002Fmanagers",{"label":81,"to":82},"Sellers and shop owners","\u002Fmy\u002Ffor\u002Fsellers","© 2026 DataGlass Labs. All rights reserved.",{"text":85,"caption":86},"Measure what you keep, and then grow what you measure.","The DataGlass team",{"label":88,"prompt":89,"assistants":90},"Ask AI about DataGlass","I want to understand DataGlass, a decision engine for Shopee, Lazada and TikTok Shop sellers that optimizes ads, pricing and promotions for true profit. Use web search to read their website at https:\u002F\u002Fwww.dataglasslabs.com (with an agent-readable summary at https:\u002F\u002Fwww.dataglasslabs.com\u002Fllms.txt), then explain what DataGlass does, who it is for and how it differs from an analytics dashboard.",[91,95,99],{"label":92,"icon":93,"url":94},"ChatGPT","chatgpt","https:\u002F\u002Fchatgpt.com\u002F?prompt={prompt}",{"label":96,"icon":97,"url":98},"Claude","claude","https:\u002F\u002Fclaude.ai\u002Fnew?q={prompt}",{"label":100,"icon":101,"url":102},"Perplexity","perplexity","https:\u002F\u002Fwww.perplexity.ai\u002Fsearch?q={prompt}",[104,108,112],{"label":105,"icon":106,"to":107},"LinkedIn","i-lucide-linkedin","https:\u002F\u002Fwww.linkedin.com\u002Fcompany\u002Fdataglass-labs",{"label":109,"icon":110,"to":111},"Facebook","i-lucide-facebook","https:\u002F\u002Fwww.facebook.com\u002Fdataglasslabsth",{"label":113,"icon":114,"to":115},"Instagram","i-lucide-instagram","https:\u002F\u002Fwww.instagram.com\u002Fdataglasslabs\u002F",{"links":117,"cta":196,"secondaryCta":199},[118,152,191,193,194,195],{"label":9,"to":119,"menu":120},"\u002Fmy",{"layout":121,"heading":122,"cards":123,"groups":135,"footer":142},"cards","What DataGlass does",[124,128,132],{"label":125,"description":126,"to":13,"ui":127},"True profit ads optimization","Budgets, pacing and Target ROAS tuned for profit.","budget-tomorrow",{"label":129,"description":130,"to":16,"ui":131},"Unit economics breakdown","What you actually earn from every sale.","unit-economics",{"label":18,"description":133,"to":19,"motif":134},"An AI agent that knows your shops.",true,[136],{"label":137,"size":138,"links":139},"More","secondary",[140,141],{"label":21,"to":22},{"label":24,"to":25},[143,148],{"lead":144,"label":145,"icon":146,"to":147},"DataGlass v.2.6.","See what's new","i-lucide-box","https:\u002F\u002Flearn.dataglasslabs.com\u002Freleases",{"lead":149,"label":150,"icon":151,"to":37},"Read our","customer stories","i-lucide-book-open",{"label":30,"to":34,"menu":153},{"layout":154,"groups":155},"directory",[156,164,170,182],{"label":66,"size":157,"links":158},"primary",[159,160,161,162,163],{"label":69,"to":70},{"label":72,"to":73},{"label":75,"to":76},{"label":78,"to":79},{"label":81,"to":82},{"label":165,"size":157,"links":166},"Insights",[167,168,169],{"label":33,"to":34},{"label":36,"to":37},{"label":39,"to":40},{"label":171,"size":157,"links":172},"Learn",[173,174,177,180],{"label":45,"to":46},{"label":175,"to":176},"Use cases","https:\u002F\u002Flearn.dataglasslabs.com\u002Fuse-cases",{"label":178,"to":179},"Training","https:\u002F\u002Flearn.dataglasslabs.com\u002Ftraining",{"label":181,"to":147},"Changelog",{"label":183,"size":138,"links":184},"Support",[185,186,189],{"label":42,"to":43},{"label":187,"to":188},"Brand kit","\u002Fmy\u002Fbrand",{"label":190,"to":55},"Contact us",{"label":192,"to":37},"Customers",{"label":27,"to":28},{"label":48,"to":52},{"label":54,"to":55},{"label":197,"to":198},"Start for free","https:\u002F\u002Fapp.dataglasslabs.com\u002Fsign-up",{"label":200,"to":201},"Sign in","https:\u002F\u002Fapp.dataglasslabs.com\u002Fsign-in",{"clear":203,"groups":204},"Clear filters",[205,218],{"key":206,"label":207,"options":208},"platforms","Platform",[209,212,215],{"value":210,"label":211},"shopee","Shopee",{"value":213,"label":214},"lazada","Lazada",{"value":216,"label":217},"tiktok","TikTok Shop",{"key":219,"label":220,"options":221},"format","Format",[222,225,228,231,234,237,240],{"value":223,"label":224},"guide","Guide",{"value":226,"label":227},"article","Article",{"value":229,"label":230},"comparison","Comparison",{"value":232,"label":233},"calculator","Calculator",{"value":235,"label":236},"paper","Paper",{"value":238,"label":239},"survey","Survey",{"value":241,"label":242},"dataset","Dataset",{},{"title":245,"description":246,"cta":247,"errorTitle":249},"Page not found","The page may have moved, or it never existed.",{"label":248,"to":119},"Back to home","Something went wrong","en\u002Fchrome",{"previous":252,"next":253,"pause":254,"play":255,"goTo":256,"expand":257,"close":258,"readMore":259,"learnMore":260,"seeAll":261,"menu":262,"back":263,"share":264,"shareOn":265,"copyLink":266,"copied":267,"onThisPage":268,"minRead":269,"sources":270,"viewMore":271,"searchPosts":272,"allPosts":273,"all":274,"filters":275,"search":276,"searchClose":277,"searchPlaceholder":278,"searchSuggested":279,"searchResults":280,"searchNoResults":281,"searchLoading":282,"relatedTitle":283,"mainNav":284,"footerNav":285},"Previous","Next","Pause","Play","Go to item","Expand","Close","Read more","Learn more","See all","Menu","Back","Share","Share on","Copy link","Link copied","On this page","{n} min read","Sources","View more","Search posts","All posts","All","Filters","Search","Close search","Search DataGlass","Suggested","Results","No results for","Loading","More to discover","Main","Footer","HZQSEulcpFGY0nWnUTNYhG2n06nO97XnUBc_pEVOFxo",{"id":288,"cta":289,"extension":5,"glossary":42,"meta":295,"related":296,"stem":297,"whatIs":298,"__hash__":299},"glossaryTerm_en\u002Fen\u002Fglossary-term.yml",{"headline":290,"description":291,"primaryCta":292,"secondaryCta":293},"Put this number to work on your own shops","See it computed from your orders, fees and ads, with a demo on your data.",{"label":57,"to":58},{"label":294,"to":28},"See pricing",{},"Related terms","en\u002Fglossary-term","What is {term}?","lxyPsyClqTqVxZhmfDihDsuAz7Al3t22gFHKeu2Lza8",[301,304,306,309,312,315,318],{"slug":302,"label":303},"profit","Profit",{"slug":305,"label":27},"pricing",{"slug":307,"label":308},"ads","Ads",{"slug":310,"label":311},"operations","Operations",{"slug":313,"label":314},"market","Market",{"slug":316,"label":317},"data-science","Data Science",{"slug":319,"label":48},"company",{"entry":321,"document":354,"toc":470},{"id":322,"title":323,"aliases":324,"category":310,"cta":325,"date":328,"description":329,"draft":330,"draftReason":324,"extension":331,"meta":332,"navigation":324,"ogImage":324,"path":333,"readMinutes":334,"related":335,"robots":324,"schemaOrg":324,"seo":341,"short":327,"sitemap":343,"sources":344,"stem":352,"updatedAt":324,"__hash__":353},"glossary_en\u002Fglossary\u002Fsafety-stock.md","Safety stock",null,{"title":326,"body":327},"See it on your own shop, free.","The buffer held against demand and lead-time variance. Priced by what a stockout costs you, not by a rule of thumb.","2026-10-23","Safety stock is the buffer against demand and lead-time variability. The formula, how to choose a service level from contribution, and why weeks-of-cover fails.",false,"md",{},"\u002Fglossary\u002Fsafety-stock",3,[336,337,338,339,340],"reorder-point","stockout","contribution-margin","bayesian-inference","cvar",{"title":342,"description":329},"What is Safety Stock? Formula and Service Levels | DataGlass",{"loc":333},[345,348],{"title":323,"url":346,"note":347},"https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FSafety_stock","The standard safety-stock formulation combining demand and lead-time variability with a service-level factor.",{"title":349,"url":350,"note":351},"Newsvendor model","https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FNewsvendor_model","The critical-ratio result that sets the economically optimal service level from understock and overstock costs.","glossary\u002Fsafety-stock","f2QU-aik0hH4bSPVdiyNfvBPW4Mz8lVfpMZ0Cxt41oI",{"frontmatter":355,"meta":362,"nodes":391},{"title":323,"description":329,"seo":356,"short":327,"category":310,"related":357,"date":328,"sources":358,"cta":361,"readMinutes":334},{"title":342,"description":329},[336,337,338,339,340],[359,360],{"title":323,"url":346,"note":347},{"title":349,"url":350,"note":351},{"title":326,"body":327},{"toc":363},{"title":364,"searchDepth":365,"depth":365,"links":366},"",2,[367,370,373,376,379,382,385,388],{"id":368,"depth":365,"text":369},"formula","Formula",{"id":371,"depth":365,"text":372},"example","Example",{"id":374,"depth":365,"text":375},"how-do-you-choose-the-service-level","How do you choose the service level?",{"id":377,"depth":365,"text":378},"why-does-lead-time-variance-dominate","Why does lead-time variance dominate?",{"id":380,"depth":365,"text":381},"why-is-weeks-of-cover-not-a-substitute","Why is weeks-of-cover not a substitute?",{"id":383,"depth":365,"text":384},"why-it-matters","Why it matters",{"id":386,"depth":365,"text":387},"in-dataglass","In DataGlass",{"id":389,"depth":365,"text":390},"where-this-shows-up","Where this shows up",[392,396,399,408,410,415,417,420,422,425,427,430,432,435,440,442,445,447],[393,394,395],"p",{},"Safety stock is the inventory held above expected demand to absorb variability while a replenishment order is in transit. It exists because both demand and lead time are uncertain: if either could be known exactly, a seller would order to arrive precisely as the last unit sold. Its size is set by how variable those two quantities are and by the service level chosen — the probability of not stocking out during a replenishment cycle — and the right service level is an economic decision, driven by the contribution lost when demand is missed against the cost of holding stock that does not move.",[397,398,369],"h2",{"id":368},[400,401,403],"pre",{"language":402},"text",[404,405,407],"code",{"class":406},"language-text","Safety stock = z × √( LT × σ²demand  +  demand² × σ²LT )\n\n  z    = service-level factor (90% → 1.28, 95% → 1.65, 99% → 2.33)\n  LT   = average lead time\n  σ    = standard deviation of daily demand \u002F of lead time\n\nEconomic service level = Cu \u002F (Cu + Co)\n  Cu = contribution lost per unit short, Co = cost of holding one unsold unit",[397,409,372],{"id":371},[400,411,412],{"language":402},[404,413,414],{"class":406},"Daily demand averages 20 units with a standard deviation of 7.\nLead time averages 14 days with a standard deviation of 3.\n\nAt a 95% service level (z = 1.65):\n  √(14 × 49 + 400 × 9) = √(686 + 3,600) = 65.5\n  Safety stock = 1.65 × 65.5 ≈ 108 units\n\nNote that lead-time variance contributes 3,600 of the 4,286 —\nfive times more than demand variance. Stabilising the supplier beats\nforecasting better.",[397,416,375],{"id":374},[393,418,419],{},"Economically, not by convention. The critical ratio sets it: divide the contribution lost per unit of unmet demand by that same figure plus the cost of holding a unit that ends up unsold. A high-contribution, non-perishable product with stable demand deserves a service level in the high nineties, because missing a sale is expensive and holding stock is not. A thin-margin seasonal item deserves far less, because unsold units at the end of the season are written down and the contribution forgone on a missed sale was small anyway. Applying one target — 95% is the usual default — across a whole catalogue overstocks the thin products and understocks the fat ones simultaneously.",[397,421,378],{"id":377},[393,423,424],{},"Look at the two terms inside the square root. Demand variance is multiplied by the lead time; lead-time variance is multiplied by the square of demand. For any product selling more than a handful of units per day, the second term grows much faster, which means an unreliable supplier drives the buffer more than unpredictable customers do. The practical consequence is counter-intuitive and worth acting on: for most marketplace sellers, getting a supplier to deliver in a consistent fourteen days releases more working capital than any improvement in demand forecasting, and it is usually the cheaper project.",[397,426,381],{"id":380},[393,428,429],{},"Because it ignores variability entirely. Two SKUs both selling 20 units a day, one steady and one swinging between 5 and 60, need very different buffers, and a three-weeks-of-cover rule gives them the same one — over-stocking the steady product and stocking out on the volatile one. Weeks of cover is a useful reporting summary and a poor planning rule. It also breaks down exactly when it matters most, during campaign periods, because the trailing average it is computed from does not know about the demand spike that is coming.",[397,431,384],{"id":383},[393,433,434],{},"Safety stock is where the stockout-versus-overstock trade-off is actually made, and most shops make it implicitly through a habit rather than explicitly through a number. The cost of getting it wrong shows up in two places that are never compared to each other: lost contribution and wasted ad spend on one side, and dead capital and end-of-season write-downs on the other. Setting it deliberately is what lets a shop hold less inventory overall and stock out less often.",[436,437,439],"blog-callout",{"title":438},"Common mistake","Setting safety stock as a percentage of average demand. The buffer should scale with the standard deviation of demand and lead time, not with their level. A high-volume, perfectly predictable SKU needs almost no buffer; a low-volume, erratic one may need weeks of it. A percentage rule gets both backwards.",[397,441,387],{"id":386},[393,443,444],{},"DataGlass forecasts demand per SKU with an explicit uncertainty band rather than a point estimate, so the safety stock it proposes reflects how predictable that product actually is. Service levels are derived from the SKU’s own contribution and holding cost rather than from a catalogue-wide default, and known campaign windows are included in the demand the buffer has to cover.",[397,446,390],{"id":389},[448,449,450,458,464],"ul",{},[451,452,453],"li",{},[454,455,457],"a",{"href":456},"\u002Fmy\u002Fblog\u002Finventory-stockout","Inventory & stockout",[451,459,460],{},[454,461,463],{"href":462},"\u002Fmy\u002Fblog\u002Finventory-stockout-math-ecommerce","Stockout math for e-commerce sellers",[451,465,466],{},[454,467,469],{"href":468},"\u002Fmy\u002Fblog\u002Fml-demand-forecasting-for-ecommerce","ML demand forecasting for e-commerce sellers",[471,472,473,474,475,476,477,478],{"id":368,"depth":365,"text":369},{"id":371,"depth":365,"text":372},{"id":374,"depth":365,"text":375},{"id":377,"depth":365,"text":378},{"id":380,"depth":365,"text":381},{"id":383,"depth":365,"text":384},{"id":386,"depth":365,"text":387},{"id":389,"depth":365,"text":390},{"id":480,"categories":481,"domain":488,"extension":5,"fallback":489,"home":492,"industry":501,"meta":506,"pricing":507,"stem":519,"__hash__":520},"og_en\u002Fen\u002Fog.yml",[482,483,484,485,486,487],{"slug":302,"label":303},{"slug":305,"label":27},{"slug":307,"label":308},{"slug":310,"label":311},{"slug":316,"label":317},{"slug":319,"label":48},"dataglasslabs.com",{"title":490,"description":491},"DataGlass","The decision engine for Shopee, Lazada and TikTok Shop sellers.",{"chart":493,"metrics":494},"Net profit, last 30 days",[495,498],{"label":496,"value":497},"Net profit","฿1.24M",{"label":499,"value":500},"Profit ROAS","3.4x",{"axis":502,"point":503},"Ad spend",{"label":504,"value":505},"Next baht still pays","+฿0.42",{},{"plans":508},[509,513,516],{"name":510,"price":511,"period":512},"Free","฿0","\u002Fmonth",{"name":514,"price":515,"period":512},"Standard","฿1,499",{"name":517,"price":518,"period":512},"Pro","฿2,499","en\u002Fog","63L8y4Lv8I2q3NvR26fMXU1sE9Wd7TZaz2l_tV6oZuo",[],[523,527,531,535,539],{"path":524,"title":525,"short":526,"draft":330},"\u002Fglossary\u002Freorder-point","Reorder point","The stock level that triggers a replenishment order — expected demand over the lead time, plus the safety buffer.",{"path":528,"title":529,"short":530,"draft":330},"\u002Fglossary\u002Fstockout","Stockout","Inventory hitting zero on a SKU customers want to buy. Lost revenue, wasted ad spend, and a ranking penalty that outlasts the restock.",{"path":532,"title":533,"short":534,"draft":330},"\u002Fglossary\u002Fcontribution-margin","Contribution margin","Revenue minus every variable cost of selling one more unit — the profit each sale actually contributes after fees, ads, and fulfillment.",{"path":536,"title":537,"short":538,"draft":330},"\u002Fglossary\u002Fbayesian-inference","Bayesian inference","Estimating with a range instead of a single number, so a decision can account for how little it actually knows.",{"path":540,"title":541,"short":542,"draft":330},"\u002Fglossary\u002Fcvar","CVaR","Conditional Value at Risk — the average outcome in the worst cases. Not how often it goes wrong, but how bad it gets when it does.",1792785009059]